package com.org.service.iml;

import com.org.dao.UserDao;
import com.org.dao.impl.UserDaoImp;
import com.org.javabean.ShopInfo;
import com.org.javabean.UserInfo;
import com.org.service.UserService;

import java.util.List;


public class UserServiceImpl implements UserService {

    static UserDao userDao = new UserDaoImp();

    @Override
    public List<UserInfo> showUsers() {

        return userDao.selectAllUsers();
    }

    @Override
    public int getResultCount(String userName, String userPsw, String userTx) {
        return userDao.getRegisterResult(userName,  userPsw, userTx);
    }

    @Override
    public int getLoginCount(String userName, String userPsw) {
        return userDao.getLoginResult(userName,userPsw);
    }

    @Override
    public String getImg(String userName) {
        return userDao.getImgResult(userName);
    }

    @Override
    public List<ShopInfo> getList() {
        return  userDao.getShopList();
    }

    @Override
    public ShopInfo getShopInfo(int id) {
        return userDao.getShopInfo(id);
    }


}
